package com.dalin.platform.loa.action;

import com.dalin.framework.action.StrutsTwoAction;
import com.dalin.platform.loa.service.LoaService;
import com.dalin.platform.loa.vo.LoaRoleVo;
/*****************************************************************************
 * @content: 类信息                                                   *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2010-06-07                                                     *
 * @modDate: 2010-06-07                                                     *
 * @version: 1.00                                                           *
 ****************************************************************************/
public class RoleAddModAction extends StrutsTwoAction {
	private LoaService loaService; // 
    private LoaRoleVo vo; // 

    public String execute() throws Exception {
    	try {
    		vo.setProjectId(getCurrentUser().getProjectId());
    		if (vo.getRoleId() == null || vo.getRoleId() == 0) {
            	loaService.addLoaRole(vo);
            } else {
            	loaService.modifyLoaRole(vo);
            }
    		setResContent(true, "");
    	} catch (Exception e) {
    		e.printStackTrace();
    		setResContent(e);
    	}
        return null;
    }





	public LoaService getLoaService() {
		return loaService;
	}
	public void setLoaService(LoaService loaService) {
		this.loaService = loaService;
	}
	public LoaRoleVo getVo() {
		return vo;
	}
	public void setVo(LoaRoleVo vo) {
		this.vo = vo;
	}
}
